package com.springboot.fwwb09.controller;


import com.springboot.fwwb09.entity.station;
import com.springboot.fwwb09.service.undergroundService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("stations")
@CrossOrigin
public class stationController {
    @Autowired
    private com.springboot.fwwb09.service.stationService stationService;
    //    查询所有的方法
    @GetMapping("findAll")
    public List<station> findAll() {
        List<station> station = stationService.findAll();
        return station;

    }
}
